home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / Kibitz / !!! Kibitz.Roadmap < prev    next >
Encoding:
Text File  |  1994-05-06  |  5.2 KB  |  142 lines  |  [TEXT/MPS ]

  1. Kibitz is broken up into a lot of files to (hopefully) make things easier for
  2. you to use.  We realize that you don't want a lot of the application-specific
  3. code, so it is separated from the rest rather well.  (We will be separating
  4. it even more in the next version.)
  5.  
  6. Unfortunately, having a lot of files can sometimes make finding a specific
  7. function more difficult.  In this roadmap, I will describe the basic purpose
  8. of each file.
  9.  
  10.  
  11. KIBITZ C CODE:
  12.  
  13.     AEchess.c
  14. This is the application-specific AppleEvents code.  The dispatcher, as well
  15. as the application-specific dispatcher are both found here.  This is so that
  16. AppleEvents.c can remain unchanged, or at least have a chance at not changing.
  17.  
  18.     AppleEvents.c
  19. This file holds the core AppleEvents code.  There is a very useful function
  20. in this file called MakeTarget (by Keith Rollin).  This function creates
  21. a target descriptor for the AppleEvents, and it does it in a way that handles
  22. many of the variations, such as sending to yourself.  If you are going to
  23. use AppleEvents, you will like MakeTarget.
  24.  
  25.     BoardSlider.c
  26. This is the code for the custom slider.  It is very application-specific, and
  27. is probably not of great use to anyone.
  28.  
  29.     Chess.c
  30. This is definitely application-specific code.  If you are interested, then take
  31. a look.  Otherwise, save yourself some time.  (I didn't comment this as much,
  32. since it is so application-specific.)
  33.  
  34.     Config.c
  35. Application-specific configuration dialog code.  Again, look if you want.
  36.  
  37.     DoCursor.c
  38. This is the code for handling the cursor and for figuring out the cursor
  39. region for WaitNextEvent.  Simply replace this code with your application's
  40. cursor code.
  41.  
  42.     DoEvent.c
  43. This is the code that dispatches for the different events.  Replace code
  44. as necessary for your application.
  45.  
  46.     EventLoop.c
  47. This code does next to nothing, and therefore most likely doesn't have to
  48. change, or doesn't need to change much.
  49.  
  50.     File.c
  51. This is a (kind-of) generic file I/O unit.  There are three functions that
  52. you will need to rewrite for your application's data structure.  Otherwise,
  53. this code should not have to change much.  These functions are:
  54.         AppReadDocument:       Reads in the application-specific data.
  55.         AppWriteDocument:       Write out the application-specific data.
  56.         AppDuplicateDocument:  Duplicates an opene document into a new window.
  57.  
  58.     Help.c
  59. This is the balloon help code.  Kibitz supports dynamic balloon help in the
  60. content of the window.  The code to do this is all here.
  61.  
  62.     IdleTasks.c
  63. Handle any NULL event tasks that you application has.  For Kibitz, this is
  64. when the computer moves, if you have the computer moving pieces.  This is
  65. also where network-game-resync events are handled.
  66.  
  67.     Init.c
  68. This initialization code is separated from the rest of the application
  69. because it isn't supposed to have to change.  (Yea, right.)
  70.  
  71.     KibitzWindow.c
  72. This is where you will find the window code that is specific to Kibitz.
  73.  
  74.     Menu.c
  75. Application-specific menu code goes here.
  76.  
  77.     Print.c
  78. This print-loop code shouldn't have to change.  It sets up a global that
  79. the ImageDocument function can use to determine if it is printing or not.
  80. This global is the page number to be printed.  (If it is 0, then the
  81. application isn't printing.)  If the user wants all pages printed, the
  82. print-loop keeps sending ImageDocument incrementally larger page numbers
  83. to print.  ImageDocument is responsible for figuring out that there are no
  84. more pages to print.  When there are no more pages, just set gPrintPage
  85. to zero and return.  The print-loop won't call ImageDocument after that.
  86. (This print-loop code is ZZ approved, and may end up in the print-loop
  87. tech-note.)
  88.  
  89.     Setup.c
  90. This is application-specific code to set up a chess position or problem.
  91.  
  92.     Sound.c
  93. This is the (very little) code necessary for sound support.  7.0 sound
  94. is pretty easy stuff.
  95.  
  96.     Start.c
  97. This is the code that gets the application going.  This is where you
  98. will find main().
  99.  
  100.     TextEditControl.c
  101. This is code for a TextEdit control.  The control can easily be added to a
  102. window, just like any other control.  The control handles clicks and key
  103. events.  It also handles scrolling, cut/copy/paste/clear, as well as undo.
  104. (I think you will like this code.)
  105.  
  106.     Utils.c
  107. This is a catch-all for useful things I didn't know where else to put.  You
  108. may like the code for key-equivalents for dialogs.  The key-equivalents are
  109. put in the resource fork, so they can be localized.
  110.  
  111.     Window.c
  112. This is where all the generic window code lives.
  113.  
  114.  
  115. KIBITZ ASSEMBLY CODE:
  116.  
  117. There is a little bit of assembly code needed for Kibitz.  Here are some
  118. descriptions of those files:
  119.  
  120.     TextEditControl.a
  121. This is the assembly code glue for the TextEdit control.
  122.  
  123.     View.cdef.a
  124. This is a little assembly code for a control definition.  It is just a cdef
  125. stub that jumps to the application code.  This is very useful for custom
  126. controls that need to call the rest of the application.  (The slider needs to
  127. redraw the board as you scroll for real-time scrolling.  It also sends the
  128. opponent AppleEvents so the remost machine scrolls as well.)
  129.  
  130.  
  131.  
  132. A useful file to look at is Kibitz.protos.  This is where all function
  133. prototypes can be found.  They are grouped based on source file, so you
  134. can use Kibitz.protos as a table of content (of sorts) to find various
  135. functions.
  136.  
  137.  
  138.  
  139. Have fun in ’91.
  140.  
  141. Eric Soldan
  142.